﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RSS.aspx.vb" Inherits="Prototype_Assignments_2.RSS" %>
<%@ Import Namespace="System.Data" %>


<asp:SqlDataSource ID="RSS_Data" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MercedesConn%>" 
        ProviderName="<%$ ConnectionStrings:MercedesConn.ProviderName%>" 
        SelectCommand="SELECT [ID], [ModelName], [ModelYear], [Price] FROM [Mercedes]">
</asp:SqlDataSource>

<asp:repeater id="RSSrepeater" runat="server" DatasourceID="RSS_Data">
<HeaderTemplate>
<rss version="2.0">
 <channel>
  <title>New Mercedes C-Class Car List</title>
   <description>List of latest C-class Cars</description>
</HeaderTemplate>
<ItemTemplate>
    <item>
     <title><%# FormatForXML(DataBinder.Eval(Container.DataItem, "ModelName"))%></title>
     <link> Detail.aspx?ID=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "ID"))%></link>
        <description>   Model Year <%# FormatForXML(DataBinder.Eval(Container.DataItem, "ModelYear"))%> 
                        Price £ <%# FormatForXML(DataBinder.Eval(Container.DataItem, "Price"))%> 
        
        </description>  
         
    </item>
</ItemTemplate>
<FooterTemplate>
   </channel>
  </rss>
 </FooterTemplate>
</asp:repeater>
